<?php


namespace frontend\models\cyf;


use yii\db\ActiveRecord;

class OrderLog extends ActiveRecord
{
    public static function tableName()
    {
        return '2008a_order_log';
    }

    /**
     * 添加日志
     * @param $params
     * @return bool
     * @cyf
     */
    public static function create($params)
    {
        $model = new OrderLog();
        $model->order_id = $params['order_id'];
        $model->user = $params['user'];
        $model->action = $params['action'];
        $model->addtime = date('Y-m-d H:i:s');
        $model->result = '';
        $model->note = '';
        return $model->save();
    }

}